package tarantula.experiment.timeandmoney;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
import junit.textui.TestRunner;

public class RunPassingTestsWithDDSlice extends TestCase {
	 public static void main(String[] args) {
		 int num = -1;
			if(args.length > 0) {
				num = Integer.parseInt(args[0]);
			}
		    TestRunner runner = new TestRunner();
		    Test t = suite();
		    if(num == 1) {
		    	t = suiteBug1();
		    } else if (num == 2) {
		    	t = suiteBug2();
		    } else if (num == 3) {
		    	t = suiteBug3();
		    }
		    TestResult result = runner.doRun(t, false);
		    if (! result.wasSuccessful()) {
		      System.exit(1);
		    }
		  }

		  public RunPassingTestsWithDDSlice(String name) {
		    super(name);
		  }

		  public static Test suite() {
		    TestSuite result = new TestSuite();
		    result.addTest(new TestSuite(TimeAndMoneyFailedTestsDDSlice.class));
		    
		    result.addTest(new TestSuite(TimeAndMoneyTestsForTarantula0.class));
		    return result;
		  }
		  
		  public static Test suiteBug1() {
			    TestSuite result = new TestSuite();
			    result.addTest(new TestSuite(TimeAndMoneyFailedTestsDDSliceBug1.class));
			    
			    result.addTest(new TestSuite(TimeAndMoneyTestsForTarantula0.class));
			    return result;
			  }
		  
		  public static Test suiteBug2() {
			    TestSuite result = new TestSuite();
			    result.addTest(new TestSuite(TimeAndMoneyFailedTestsDDSliceBug2.class));
			    
			    result.addTest(new TestSuite(TimeAndMoneyTestsForTarantula0.class));
			    return result;
			  }
		  
		  public static Test suiteBug3() {
			    TestSuite result = new TestSuite();
			    result.addTest(new TestSuite(TimeAndMoneyFailedTestsDDSliceBug3.class));
			    
			    result.addTest(new TestSuite(TimeAndMoneyTestsForTarantula0.class));
			    return result;
			  }
}
